package com.yjd.comm.annotation;

import com.yjd.comm.enums.CachNameSpaceEnum;
import com.yjd.comm.enums.ExpireTime;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 重写redis @Cacheable注解
 * Created by yjd-wap on 2017/9/6.
 */

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Cacheable {
    public String key() default ""; // 缓存key
    public ExpireTime expire() default ExpireTime.NONE; // 缓存时效,默认无限期
    public CachNameSpaceEnum nameSpace() default CachNameSpaceEnum.DEFAULT;//缓存空间名称
}
